//封装用户相关的请求

import { request } from "@/utils/request"
//1、登录请求
export function loginAPI(formData) {
    return request({
        url:'/login',
        method: 'POST',
        data: formData
    })
}

//2.获取个人信息

export function getUserInfoAPI(){
    return request({
        url:'/user',
        method:'GET'
    })
}

//忘记密码
export function forgetPasswordAPI(formData) {
    return request({
        url:'/forgetPassword',
        method: 'POST',
        data: formData
    })
}

//获取未读邮件内容
export function getMailBoxContentAPI(identity,user_id){
    return request({
        url:`/${identity}/mailBoxContent/${user_id}`,
        method:'GET'
    })
}

//改变邮箱内容阅读状态
export function updateMailBoxContentAPI(identity,mailBoxContentId){
    return request({
        url:`/${identity}/mailBoxContent/update`,
        method:'PUT',
        data:{
            status:1,
            mailBoxContentId:mailBoxContentId
        }
    })
}
